package com.hymjweb.demo.hymj.master_bill_manage.flight.mapper;

import com.hymjweb.demo.framework.util.DataTypeUtil;
import com.hymjweb.demo.hymj.master_bill_manage.flight.bean.BMasterBillFlightPojo;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.jdbc.SQL;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
@Component
public interface BMasterBillFlightMapper {


    class BMasterBillFlightMapperProvider {

        public String findAll(Map param) {
            String sql = new SQL() {{
                SELECT("t.* ");
                FROM("b_master_bill_flight t where 1 = 1 ");
            }}.toString();

            /**
             * keyMasterBillCode: ""
             * keyOpenBillEndDate: ""
             * keyOpenBillStartDate: ""
             * keyReceiveCustomerName: ""
             * keyTransportWayId: ""
             * keyGroundAmountStatusId ：""
             * keyTransportCostStatusId ：""
             * keyAccountCheckStatusId : ""
             * keyDestCityId : ""
             * keyAirportId : ""
             * keyOutUnitId : ""
             */

            if (param != null) {
                Long keyloadWayId = DataTypeUtil.toLongObject(param.get("keyloadWayId"));
                Long keyTransportWayId = DataTypeUtil.toLongObject(param.get("keyTransportWayId"));
                String keyMasterBillCode = DataTypeUtil.toStringObject(param.get("keyMasterBillCode"));
                String keyOpenBillEndDate = DataTypeUtil.toStringObject(param.get("keyOpenBillEndDate"));
                String keyOpenBillStartDate = DataTypeUtil.toStringObject(param.get("keyOpenBillStartDate"));
                String keyReceiveCustomerName = DataTypeUtil.toStringObject(param.get("keyReceiveCustomerName"));
                Long keyGroundAmountStatusId = DataTypeUtil.toLongObject(param.get("keyGroundAmountStatusId"));
                Long keyTransportCostStatusId = DataTypeUtil.toLongObject(param.get("keyTransportCostStatusId"));
                Long keyOtherChargesStatusId = DataTypeUtil.toLongObject(param.get("keyOtherChargesStatusId"));

                Long keyAirlinesAddCostStatusId = DataTypeUtil.toLongObject(param.get("keyAirlinesAddCostStatusId"));

                Long keyAccountCheckStatusId = DataTypeUtil.toLongObject(param.get("keyAccountCheckStatusId"));
                String keyDestCityId = DataTypeUtil.toStringObject(param.get("keyDestCityId"));
                String keyAirportId = DataTypeUtil.toStringObject(param.get("keyAirportId"));
                String keyOutUnitId = DataTypeUtil.toStringObject(param.get("keyOutUnitId"));


                Long keyTransportCostAccountCheckStatusId = DataTypeUtil.toLongObject(param.get("keyTransportCostAccountCheckStatusId"));
                Long keyGroundAmountAccountCheckStatusId = DataTypeUtil.toLongObject(param.get("keyGroundAmountAccountCheckStatusId"));
                Long keyAirlinesAddCostAccountCheckStatusId = DataTypeUtil.toLongObject(param.get("keyAirlinesAddCostAccountCheckStatusId"));
                Long keyOtherChargesAccountCheckStatusId = DataTypeUtil.toLongObject(param.get("keyOtherChargesAccountCheckStatusId"));



                if (keyloadWayId != null) {
                    sql += " and t.load_way_id = " + keyloadWayId;
                }

                if (keyTransportWayId != null) {
                    sql += " and t.transport_way_id = " + keyTransportWayId;
                }

                if (keyMasterBillCode != null) {
                    sql += " and t.id like " + DataTypeUtil.quoteAllLikeStr(keyMasterBillCode);
                }

                if (keyReceiveCustomerName != null) {
                    sql += " and t.receive_customer_name like " + DataTypeUtil.quoteAllLikeStr(keyReceiveCustomerName);
                }

                if (keyOpenBillStartDate != null) {
                    if (keyOpenBillEndDate != null) {
                        int d = keyOpenBillStartDate.compareTo(keyOpenBillEndDate);
                        if (d > 0) {
                            String tempDate = keyOpenBillStartDate;
                            keyOpenBillStartDate = keyOpenBillEndDate;
                            keyOpenBillEndDate = tempDate;
                        }
                        // and (date_format(t.create_time,'%Y-%m-%d') between keyOpenBillStartDate and keyOpenBillEndDate)
                        sql += " and (date_format(t.create_time,'%Y-%m-%d') between " + DataTypeUtil.quoteStr(keyOpenBillStartDate) + " and " + DataTypeUtil.quoteStr(keyOpenBillEndDate) + ")";
                    } else {
                        sql += " and date_format(t.create_time,'%Y-%m-%d') = " + DataTypeUtil.quoteStr(keyOpenBillStartDate);
                    }
                } else {
                    if (keyOpenBillEndDate != null) {
                        sql += " and date_format(t.create_time,'%Y-%m-%d') = " + DataTypeUtil.quoteStr(keyOpenBillEndDate);
                    }
                }

                if (keyGroundAmountStatusId != null) {
                    sql += " and t.ground_amount_status_id = " + keyGroundAmountStatusId;
                }

                if (keyTransportCostStatusId != null) {
                    sql += " and t.transport_cost_status_id = " + keyTransportCostStatusId;
                }

                if (keyOtherChargesStatusId != null) {
                    sql += " and t.other_charges_status_id = " + keyOtherChargesStatusId;
                }

                if (keyAirlinesAddCostStatusId != null) {
                    sql += " and t.airlines_add_cost_status_id = " + keyAirlinesAddCostStatusId;
                }

                if (keyAccountCheckStatusId != null) {
                    sql += " and t.account_check_status_id = " + keyAccountCheckStatusId;
                }

                if (keyDestCityId != null) {
                    sql += " and t.dest_city_id = " + DataTypeUtil.quoteStr(keyDestCityId);
                }

                if (keyAirportId != null) {
                    sql += " and t.airport_id = " + DataTypeUtil.quoteStr(keyAirportId);
                }

                if (keyOutUnitId != null) {
                    sql += " and t.out_unit_id = " + DataTypeUtil.quoteStr(keyOutUnitId);
                }

                if (keyTransportCostAccountCheckStatusId != null) {
                    sql += " and t.transport_cost_account_check_status_id = " + keyTransportCostAccountCheckStatusId;
                }

                if (keyGroundAmountAccountCheckStatusId != null) {
                    sql += " and t.ground_amount_account_check_status_id = " + keyGroundAmountAccountCheckStatusId;
                }

                if (keyAirlinesAddCostAccountCheckStatusId != null) {
                    sql += " and t.airlines_add_cost_account_check_status_id = " + keyAirlinesAddCostAccountCheckStatusId;
                }

                if (keyOtherChargesAccountCheckStatusId != null) {
                    sql += " and t.other_charges_account_check_status_id = " + keyOtherChargesAccountCheckStatusId;
                }

            }

            return  "select t.* from ("+ sql + ") t" ;
        }

        public String getBMasterBillFlightPojoListByInId(String billIds) {
            String sql = new SQL() {{
                SELECT("t.* ");
                FROM("b_master_bill_flight t");
                WHERE("t.id in (" + billIds + ")");
            }}.toString();
            return sql;
        }

        public String getBMasterBillFlightPojoById(String id) {
            String sql = new SQL() {{
                SELECT("t.* ");
                FROM("b_master_bill_flight t where t.id = " + DataTypeUtil.quoteStr(id));
            }}.toString();
            return sql;
        }


        public String queryFlightAirlinesOpenBillCollectList(String startDate, String endDate) {
            String sql = new SQL() {{
                SELECT("x.name,count(0) totalNumber");
                FROM("b_master_bill_flight t left join xt_airlines x on t.airlines_id = x.id");
                WHERE("date_format(t.create_time,'%Y-%m-%d') >= #{startDate} and date_format(t.create_time,'%Y-%m-%d') <= #{endDate} ");
                GROUP_BY("x.name");
            }}.toString();
            return sql;
        }


        public String queryFlightAirportOpenBillCollectList(String startDate, String endDate) {
            String sql = new SQL() {{
                SELECT("x.name,count(0) totalNumber");
                FROM("b_master_bill_flight t left join xt_airport x on t.airport_id = x.id");
                WHERE("date_format(t.create_time,'%Y-%m-%d') >= #{startDate} and date_format(t.create_time,'%Y-%m-%d') <= #{endDate} ");
                GROUP_BY("x.name");
            }}.toString();
            return sql;
        }


        /**
         * 插入航空主单
         *
         * @param pojo 航空主单对象
         * @return 插入 航空主单对象sql
         */
        public String insert(BMasterBillFlightPojo pojo) {
            String sql = new SQL() {{
                INSERT_INTO("b_master_bill_flight");
                VALUES("id", "#{id}");
                VALUES("transport_way_id", "#{transportWayId}");
                VALUES("out_unit_id", "#{outUnitId}");
                VALUES("flight_date", "#{flightDate}");
                VALUES("airlines_id", "#{airlinesId}");
                VALUES("load_way_id", "#{loadWayId}");
                VALUES("goods_type_id", "#{goodsTypeId}");

                VALUES("airport_id", "#{airportId}");
                VALUES("dest_city_id", "#{destCityId}");
                VALUES("flight_no", "#{flightNo}");
                VALUES("flight_name", "#{flightName}");
                VALUES("plan_take_off_time", "#{planTakeOffTime}");

                VALUES("agent_company_id", "#{agentCompanyId}");
                VALUES("agent_company_name", "#{agentCompanyName}");
                VALUES("agent_company_phone", "#{agentCompanyPhone}");
                VALUES("agent_company_address", "#{agentCompanyAddress}");

                VALUES("receive_customer_id", "#{receiveCustomerId}");
                VALUES("receive_customer_name", "#{receiveCustomerName}");
                VALUES("receive_customer_phone", "#{receiveCustomerPhone}");
                VALUES("receive_customer_address", "#{receiveCustomerAddress}");

                VALUES("freight_species_id", "#{freightSpeciesId}");
                VALUES("goods_code_id", "#{goodsCodeId}");
                VALUES("goods_name", "#{goodsName}");
                VALUES("packing_way_id", "#{packingWayId}");

                VALUES("total_number", "#{totalNumber}");
                VALUES("actual_weight", "#{actualWeight}");
                VALUES("chargeable_weight", "#{chargeableWeight}");
                VALUES("actual_load_total_weight", "#{actualLoadTotalWeight}");
                VALUES("weight_rate", "#{weightRate}");
                VALUES("transport_cost", "#{transportCost}");
                VALUES("pull_dispose_transport_cost_amount", "#{pullDisposeTransportCostAmount}");
                VALUES("calc_weight_category_id", "#{calcWeightCategoryId}");
                VALUES("airport_goods_site_id", "#{airportGoodsSiteId}");
                VALUES("declared_value", "#{declaredValue}");

                VALUES("ground_amount", "#{groundAmount}");
                VALUES("pull_dispose_ground_amount", "#{pullDisposeGroundAmount}");
                VALUES("stamp_duty", "#{stampDuty}");
                VALUES("insurance_fee", "#{insuranceFee}");
                VALUES("airlines_add_cost", "#{airlinesAddCost}");
                VALUES("pull_dispose_airlines_add_cost_amount", "#{pullDisposeAirlinesAddCostAmount}");

                VALUES("other_charges", "#{otherCharges}");
                VALUES("other_charges_comment", "#{otherChargesComment}");
                VALUES("pull_dispose_other_charges_amount", "#{pullDisposeOtherChargesAmount}");

                VALUES("master_bill_payment_method_id", "#{masterBillPaymentMethodId}");
                VALUES("total_amount", "#{totalAmount}");
                VALUES("drop_amount", "#{dropAmount}");
                VALUES("settlement_amount", "#{settlementAmount}");

                VALUES("open_master_bill_date", "#{openMasterBillDate}");
                VALUES("open_master_bill_department_id", "#{openMasterBillDepartmentId}");
                VALUES("open_master_bill_user_id", "#{openMasterBillUserId}");

                VALUES("transport_cost_status_id", "#{transportCostStatusId}");
                VALUES("ground_amount_status_id", "#{groundAmountStatusId}");
                VALUES("airlines_add_cost_status_id", "#{airlinesAddCostStatusId}");
                VALUES("other_charges_status_id", "#{otherChargesStatusId}");

                VALUES("drop_status_id", "#{dropStatusId}");
                VALUES("account_check_status_id", "#{accountCheckStatusId}");
                VALUES("settlement_status_id", "#{settlementStatusId}");
                VALUES("comment", "#{comment}");

                VALUES("load_native_bill_ids", "#{loadNativeBillIds}");


                VALUES("transport_cost_account_check_status_id", "#{transportCostAccountCheckStatusId}");
                VALUES("ground_amount_account_check_status_id", "#{groundAmountAccountCheckStatusId}");
                VALUES("airlines_add_cost_account_check_status_id", "#{airlinesAddCostAccountCheckStatusId}");
                VALUES("other_charges_account_check_status_id", "#{otherChargesAccountCheckStatusId}");


                VALUES("create_time", "#{createTime}");
                VALUES("create_user_id", "#{createUserId}");
                VALUES("update_time", "#{updateTime}");
                VALUES("update_user_id", "#{updateUserId}");
            }}.toString();
            return sql;
        }

        public String update(BMasterBillFlightPojo pojo) {
            String sql = new SQL() {{
                UPDATE("b_master_bill_flight t");
                SET("t.transport_way_id = #{transportWayId}");
                SET("t.out_unit_id = #{outUnitId}");
                SET("t.flight_date = #{flightDate}");
                SET("t.airlines_id = #{airlinesId}");
                SET("t.load_way_id = #{loadWayId}");
                SET("t.goods_type_id = #{goodsTypeId}");

                SET("t.airport_id = #{airportId}");
                SET("t.dest_city_id = #{destCityId}");
                SET("t.flight_no = #{flightNo}");
                SET("t.flight_name = #{flightName}");
                SET("t.plan_take_off_time = #{planTakeOffTime}");

                SET("t.agent_company_id = #{agentCompanyId}");
                SET("t.agent_company_name = #{agentCompanyName}");
                SET("t.agent_company_phone = #{agentCompanyPhone}");
                SET("t.agent_company_address = #{agentCompanyAddress}");

                SET("t.receive_customer_id = #{receiveCustomerId}");
                SET("t.receive_customer_name = #{receiveCustomerName}");
                SET("t.receive_customer_phone = #{receiveCustomerPhone}");
                SET("t.receive_customer_address = #{receiveCustomerAddress}");

                SET("t.freight_species_id = #{freightSpeciesId}");
                SET("t.goods_code_id = #{goodsCodeId}");
                SET("t.goods_name = #{goodsName}");
                SET("t.packing_way_id = #{packingWayId}");

                SET("t.total_number = #{totalNumber}");
                SET("t.actual_weight = #{actualWeight}");
                SET("t.chargeable_weight = #{chargeableWeight}");
                SET("t.actual_load_total_weight = #{actualLoadTotalWeight}");
                SET("t.weight_rate = #{weightRate}");
                SET("t.transport_cost = #{transportCost}");
                SET("t.pull_dispose_transport_cost_amount = #{pullDisposeTransportCostAmount}");
                SET("t.calc_weight_category_id = #{calcWeightCategoryId}");
                SET("t.airport_goods_site_id = #{airportGoodsSiteId}");
                SET("t.declared_value = #{declaredValue}");

                SET("t.ground_amount = #{groundAmount}");
                SET("t.pull_dispose_ground_amount = #{pullDisposeGroundAmount}");
                SET("t.stamp_duty = #{stampDuty}");
                SET("t.insurance_fee = #{insuranceFee}");
                SET("t.airlines_add_cost = #{airlinesAddCost}");
                SET("t.pull_dispose_airlines_add_cost_amount = #{pullDisposeAirlinesAddCostAmount}");

                SET("t.other_charges = #{otherCharges}");
                SET("t.other_charges_comment = #{otherChargesComment}");
                SET("t.pull_dispose_other_charges_amount = #{pullDisposeOtherChargesAmount}");

                SET("t.master_bill_payment_method_id = #{masterBillPaymentMethodId}");
                SET("t.total_amount = #{totalAmount}");

                SET("t.open_master_bill_date = #{openMasterBillDate}");
                SET("t.open_master_bill_department_id = #{openMasterBillDepartmentId}");
                SET("t.open_master_bill_user_id = #{openMasterBillUserId}");

                SET("t.transport_cost_status_id = #{transportCostStatusId}");
                SET("t.ground_amount_status_id = #{groundAmountStatusId}");
                SET("t.airlines_add_cost_status_id = #{airlinesAddCostStatusId}");
                SET("t.other_charges_status_id = #{otherChargesStatusId}");

                SET("t.comment = #{comment}");

                SET("t.drop_amount = #{dropAmount}");
                SET("t.settlement_amount = #{settlementAmount}");
                SET("t.drop_status_id = #{dropStatusId}");
                SET("t.account_check_status_id = #{accountCheckStatusId}");
                SET("t.settlement_status_id = #{settlementStatusId}");

                SET("t.load_native_bill_ids = #{loadNativeBillIds}");


                SET("t.transport_cost_account_check_status_id = #{transportCostAccountCheckStatusId}");
                SET("t.ground_amount_account_check_status_id = #{groundAmountAccountCheckStatusId}");
                SET("t.airlines_add_cost_account_check_status_id = #{airlinesAddCostAccountCheckStatusId}");
                SET("t.other_charges_account_check_status_id = #{otherChargesAccountCheckStatusId}");

                SET("t.update_time = #{updateTime}");
                SET("t.update_user_id = #{updateUserId}");
                WHERE("t.id = #{id}");
            }}.toString();
            return sql;
        }


        public String delete(String id) {
            String sql = new SQL() {{
                DELETE_FROM("b_master_bill_flight t");
                WHERE("t.id = #{id}");
            }}.toString();
            return sql;
        }

        public String updatePojo(BMasterBillFlightPojo bMasterBillFlightPojo) {
            String sql = update(bMasterBillFlightPojo);
            return sql;
        }

        public String updateStatusId(String statusFieldName, Long statusId, String billIds, Date updateTime, String updateUserId) {
            String sql = new SQL() {{
                UPDATE("b_master_bill_flight t");
                SET("t." + statusFieldName + " = " + statusId);
                SET("t.update_time = #{updateTime}");
                SET("t.update_user_id = #{updateUserId}");
                WHERE("t.id in (" + billIds + ")");
            }}.toString();
            return sql;
        }
    }


    /**
     * @param id
     * @return
     */
    @Results(id = "bMasterBillPojoMapId", value = {
            @Result(column = "id", property = "id"),
            @Result(column = "transport_way_id", property = "transportWayId"),
            @Result(column = "out_unit_id", property = "outUnitId"),
            @Result(column = "flight_date", property = "flightDate"),
            @Result(column = "airlines_id", property = "airlinesId"),
            @Result(column = "load_way_id", property = "loadWayId"),

            @Result(column = "goods_type_id", property = "goodsTypeId"),
            @Result(column = "airport_id", property = "airportId"),
            @Result(column = "dest_city_id", property = "destCityId"),
            @Result(column = "flight_no", property = "flightNo"),
            @Result(column = "flight_name", property = "flightName"),
            @Result(column = "plan_take_off_time", property = "planTakeOffTime"),

            @Result(column = "agent_company_id", property = "agentCompanyId"),
            @Result(column = "agent_company_name", property = "agentCompanyName"),
            @Result(column = "agent_company_phone", property = "agentCompanyPhone"),
            @Result(column = "agent_company_address", property = "agentCompanyAddress"),

            @Result(column = "receive_customer_Id", property = "receiveCustomerId"),
            @Result(column = "receive_customer_name", property = "receiveCustomerName"),
            @Result(column = "receive_customer_phone", property = "receiveCustomerPhone"),
            @Result(column = "receive_customer_address", property = "receiveCustomerAddress"),
            @Result(column = "freight_species_id", property = "freightSpeciesId"),
            @Result(column = "goods_code_id", property = "goodsCodeId"),

            @Result(column = "goods_name", property = "goodsName"),
            @Result(column = "packing_way_id", property = "packingWayId"),
            @Result(column = "total_number", property = "totalNumber"),
            @Result(column = "actual_weight", property = "actualWeight"),
            @Result(column = "chargeable_weight", property = "chargeableWeight"),
            @Result(column = "actual_load_total_weight", property = "actualLoadTotalWeight"),

            @Result(column = "weight_rate", property = "weightRate"),
            @Result(column = "transport_cost", property = "transportCost"),
            @Result(column = "pull_dispose_transport_cost_amount", property = "pullDisposeTransportCostAmount"),
            @Result(column = "calc_weight_category_id", property = "calcWeightCategoryId"),
            @Result(column = "airport_goods_site_id", property = "airportGoodsSiteId"),
            @Result(column = "declared_value", property = "declaredValue"),
            @Result(column = "ground_amount", property = "groundAmount"),
            @Result(column = "pull_dispose_ground_amount", property = "pullDisposeGroundAmount"),

            @Result(column = "stamp_duty", property = "stampDuty"),
            @Result(column = "insurance_fee", property = "insuranceFee"),
            @Result(column = "airlines_add_cost", property = "airlinesAddCost"),
            @Result(column = "pull_dispose_airlines_add_cost_amount", property = "pullDisposeAirlinesAddCostAmount"),
            @Result(column = "other_charges", property = "otherCharges"),
            @Result(column = "other_charges_comment", property = "otherChargesComment"),
            @Result(column = "pull_dispose_other_charges_amount", property = "pullDisposeOtherChargesAmount"),

            @Result(column = "master_bill_payment_method_id", property = "masterBillPaymentMethodId"),
            @Result(column = "total_amount", property = "totalAmount"),
            @Result(column = "drop_amount", property = "dropAmount"),
            @Result(column = "settlement_amount", property = "settlementAmount"),

            @Result(column = "open_master_bill_date", property = "openMasterBillDate"),
            @Result(column = "open_master_bill_department_id", property = "openMasterBillDepartmentId"),
            @Result(column = "open_master_bill_user_id", property = "openMasterBillUserId"),

            @Result(column = "comment", property = "comment"),
            @Result(column = "transport_cost_status_id", property = "transportCostStatusId"),
            @Result(column = "ground_amount_status_id", property = "groundAmountStatusId"),
            @Result(column = "airlines_add_cost_status_id", property = "airlinesAddCostStatusId"),
            @Result(column = "other_charges_status_id", property = "otherChargesStatusId"),

            @Result(column = "drop_status_id", property = "dropStatusId"),
            @Result(column = "account_check_status_id", property = "accountCheckStatusId"),
            @Result(column = "settlement_status_id", property = "settlementStatusId"),

            @Result(column = "load_native_bill_ids", property = "loadNativeBillIds"),

            @Result(column = "transport_cost_account_check_status_id", property = "transportCostAccountCheckStatusId"),
            @Result(column = "ground_amount_account_check_status_id", property = "groundAmountAccountCheckStatusId"),
            @Result(column = "airlines_add_cost_account_check_status_id", property = "airlinesAddCostAccountCheckStatusId"),
            @Result(column = "other_charges_account_check_status_id", property = "otherChargesAccountCheckStatusId"),

            @Result(column = "create_time", property = "createTime"),
            @Result(column = "create_user_id", property = "createUserId"),
            @Result(column = "update_time", property = "updateTime"),
            @Result(column = "update_user_id", property = "updateUserId")
    })
    @SelectProvider(type = BMasterBillFlightMapperProvider.class, method = "getBMasterBillFlightPojoById")
    BMasterBillFlightPojo getBMasterBillFlightPojoById(String id);


    @ResultMap("bMasterBillPojoMapId")
    @SelectProvider(type = BMasterBillFlightMapperProvider.class, method = "findAll")
    List findAll(Map param);


    @ResultMap("bMasterBillPojoMapId")
    @SelectProvider(type = BMasterBillFlightMapperProvider.class, method = "getBMasterBillFlightPojoListByInId")
    List<BMasterBillFlightPojo> getBMasterBillFlightPojoListByInId(String billIds);

    @ResultType(Map.class)
    @SelectProvider(type = BMasterBillFlightMapperProvider.class, method = "queryFlightAirlinesOpenBillCollectList")
    List<Map<String, Object>> queryFlightAirlinesOpenBillCollectList(String startDate, String endDate);

    @ResultType(Map.class)
    @SelectProvider(type = BMasterBillFlightMapperProvider.class, method = "queryFlightAirportOpenBillCollectList")
    List<Map<String, Object>> queryFlightAirportOpenBillCollectList(String startDate, String endDate);


    @InsertProvider(type = BMasterBillFlightMapperProvider.class, method = "insert")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    int insert(BMasterBillFlightPojo pojo);


    @UpdateProvider(type = BMasterBillFlightMapperProvider.class, method = "update")
    int update(BMasterBillFlightPojo pojo);


    @UpdateProvider(type = BMasterBillFlightMapperProvider.class, method = "updatePojo")
    int updatePojo(BMasterBillFlightPojo bMasterBillFlightPojo);


    @UpdateProvider(type = BMasterBillFlightMapperProvider.class, method = "updateStatusId")
    int updateStatusId(String statusFieldName, Long statusId, String billIds, Date updateTime, String updateUserId);

    @DeleteProvider(type = BMasterBillFlightMapperProvider.class, method = "delete")
    int delete(String id);

}
